package cn.wjc.demo.partone.client;

import cn.wjc.demo.common.entity.Student;
import cn.wjc.demo.partone.client.fallback.PartoneFeignServiceFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = "nacos-parttwo", contextId = "addStudentApi", fallbackFactory = PartoneFeignServiceFactory.class)   //nacos中的服务名称
public interface PartoneFeignService {

    @PostMapping("/parttwo/doSomething")
    public void remoteCallParttwoDoSomething(@RequestParam("s") String s);

    @PostMapping("/parttwo/add/student")
    public void remoteCallParttwoAddStudent(@RequestBody Student student);
}
